﻿using Hotle.BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Hotel_后端.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class AdminController : ControllerBase
    {
        public AdminController(AdminBLL bll)
        {
            Bll = bll;
        }

        public AdminBLL Bll { get; }

        [HttpGet]
        //登录
        public dynamic Login(string name, string pwd)
        {
            try
            {
                var aa = Bll.Login(name, pwd);
                return Ok(aa);          

           
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

       


    }
}
